package com.inventory.service;

import com.inventory.model.SaleRecord;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
import java.util.Optional;

public interface SaleRecordService {
    
    SaleRecord saveSaleRecord(SaleRecord saleRecord);
    
    void deleteSaleRecord(Long id);
    
    Optional<SaleRecord> findById(Long id);
    
    List<SaleRecord> findAllSaleRecords();
    
    List<SaleRecord> findByProductId(Long productId);
    
    List<SaleRecord> findByDateRange(LocalDateTime startDate, LocalDateTime endDate);
    
    Double getTotalSaleAmount(LocalDateTime startDate, LocalDateTime endDate);
    
    Double getTotalProfit(LocalDateTime startDate, LocalDateTime endDate);
    
    List<SaleRecord> findLatestSalesByProductId(Long productId);
    
    List<Map<String, Object>> findTopSellingProducts(LocalDateTime startDate, LocalDateTime endDate, int limit);
} 